home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
nt
/
source.exe
/
POSIX
/
GREP
/
EG~1.SHE
< prev
next >
Wrap
Text File
|
1991-09-28
|
3KB
|
94 lines
DICT=/usr/dict/words
echo " testing MARK OF ZORRO: time ./egrep astrian $DICT"
time ./egrep astrian $DICT
echo ""
echo " testing ... AND VICTIM: time /usr/bin/egrep astrian $DICT"
time /usr/bin/egrep astrian $DICT
echo ""
echo " testing A CAPITAL IDEA: time egrep -i zurich $DICT"
time ./egrep -i zurich $DICT
echo ""
echo " testing HOAGY CARMICHAEL: time egrep 'hoe.*g' $DICT"
time ./egrep 'hoe.*g' $DICT
echo ""
echo " testing NE PLUS ULTRA: grep '+=' egrep.c"
./grep '+=' ./egrep.c
echo ""
echo " testing THE JAMES FILES: grep -l 'James'"
./grep -l James *
echo ""
echo " testing CLEVER HANS EFFECT: egrep -c count < $DICT"
./egrep -c count < $DICT
echo ""
echo " testing NUMBER OF THE BEAST: egrep -n '^[sS]atan$' $DICT"
time ./egrep -n '^[sS]atan$' $DICT
echo ""
echo " testing STATUS BACK BABY: grep -s 'my.*baby' $DICT"
if ./grep -s 'my.*baby' $DICT
then echo SOMETHING IS WRONG
else echo status OK
fi
echo ""
echo " testing PARALLEL FIFTHS: time egrep 'Ae|Ze|Oe|Qe|Xe' $DICT"
time ./egrep 'Ae|Qe|Oe|Xe|Ze' $DICT
echo ""
echo " testing TEE FOR TWO: tee < eg.shell | ./egrep TWO"
echo " (or, short blocks go home)"
tee < eg.shell | ./egrep TWO
echo ""
echo " testing HARD-TO-RHYME COLORS:"
echo " (echo orange; echo silver; echo purple) > colors"
echo " time ./fgrep -f colors $DICT > /dev/null"
(echo orange; echo silver; echo purple) > colors
time ./fgrep -f colors $DICT > /dev/null
rm colors
echo ""
echo " testing FAKE KANJI: ./egrep -f kanjipat.fake kanji.fake.test"
./egrep -f kanjipat.fake kanji.fake.test | tr -d '\216'
echo ""
echo " testing NOTHING: ./egrep '' egrep.c"
./egrep '' $DICT
echo ""
echo " testing SPEAK OF THE DEVIL (torture test courtesy Scott Anderson):"
echo " or, WIN ALL 32 WITHOUT LAZY EVALUATION"
echo './egrep "' 'M[ou]'"'"'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"' egad
cat > egad << 'Egad'
1) Muammar Qaddafi
2) Mo'ammar Gadhafi
3) Muammar Kaddafi
4) Muammar Qadhafi
5) Moammar El Kadhafi
6) Muammar Gadafi
7) Mu'ammar al-Qadafi
8) Moamer El Kazzafi
9) Moamar al-Gaddafi
10) Mu'ammar Al Qathafi
11) Muammar Al Qathafi
12) Mo'ammar el-Gadhafi
13) Moamar El Kadhafi
14) Muammar al-Qadhafi
15) Mu'ammar al-Qadhdhafi
16) Mu'ammar Qadafi
17) Moamar Gaddafi
18) Mu'ammar Qadhdhafi
19) Muammar Khaddafi
20) Muammar al-Khaddafi
21) Mu'amar al-Kadafi
22) Muammar Ghaddafy
23) Muammar Ghadafi
24) Muammar Ghaddafi
25) Muamar Kaddafi
26) Muammar Quathafi
27) Muammar Gheddafi
28) Muamar Al-Kaddafi
29) Moammar Khadafy
30) Moammar Qudhafi
31) Mu'ammar al-Qaddafi
32) Mulazim Awwal Mu'ammar Muhammad Abu Minyar al-Qadhafi
Egad
# there are subtle reasons why this odd command is not directly applied
# to a "here document"
time ./egrep "M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]" egad
rm egad